package com.ehome.poct.core.dao.mybatis;

import com.ehome.poct.core.api.dto.check.AlgoRequestLog;
import com.ehome.poct.core.api.dto.check.CellAlgoRequestLog;
import com.ehome.poct.core.dao.dataconverter.CellCheckDataConverter;
import com.ehome.poct.core.dao.entity.check.CellAlgoReqLogDO;
import com.ehome.poct.core.dao.mybatis.mapper.CellAlgoRequestMapper;
import com.ehome.poct.core.repository.check.AlgoRequestLogRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @author cq
 * @since  2022/03/08
 */
@Repository
public class AlgoRequestLogRepositoryImpl implements AlgoRequestLogRepository {
    @Autowired
    private CellAlgoRequestMapper algoRequestMapper;
    @Override
    public void save(AlgoRequestLog requestLog) {
        CellAlgoReqLogDO logDo = CellCheckDataConverter.toAlgoRepLog((CellAlgoRequestLog) requestLog);
        algoRequestMapper.insert(logDo);
    }

}
